package sdcncsi.ict.counter;

public class VisitItem {
	private int id = -1;//访问记录的ID
	private long timestamp = System.currentTimeMillis();//时间戳
	private boolean newRecord = true;//说明是新的记录
	/**
	 * 构造方法
	 */
	public VisitItem(){}
	public VisitItem(int id) {
		super();
		this.id = id;
	}
	public VisitItem(int id, boolean newRecord) {
		super();
		this.id = id;
		this.newRecord = newRecord;
	}
	/**
	 * getters and setters method
	 */
	public int getID() {
		return id;
	}
	public void setID(int id) {
		this.id = id;
	}
	public void setGenID(int id) {
		this.id = id;
		this.newRecord = false;
	}
	public boolean isNewRecord() {
		return newRecord;
	}
	public void setNewRecord(boolean newRecord) {
		this.newRecord = newRecord;
	}
	public long getTimestamp() {
		return timestamp;
	}
	public void setTimestamp(long timestamp) {
		this.timestamp = timestamp;
	}
	public void refresh() {
		this.timestamp = System.currentTimeMillis();
	}
	
}
